Skip to main content

Directory Exists

AutomatR.SFTP.DirectoryExists

The "Directory Exists" activity in AutomatR is part of the SFTP activities package, allowing users to check whether a specific directory exists on an SFTP server. This activity helps in verifying the presence of a directory, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
ClientSpecifies the SFTP client object to connect to the SFTP server.
Server PathSpecifies the path of the directory on the SFTP server to check for existence.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the activity. Useful for handling synchronization issues.
Output
ResultOutputs a boolean value indicating whether the specified directory exists on the SFTP server. Variables of type boolean to store the existence result.

How to use:

  1. Drag and drop the "Directory Exists" activity onto the workflow.
  2. Configure the properties by specifying the SFTP client, server path, and optionally set a delay.
  3. Execute the workflow to check the existence of the specified directory on the SFTP server.
  4. The result (true or false) will be stored in the boolean variable specified in the Result property.

Example:

Consider an example where the "Directory Exists" activity is used to check whether the "/Documents/" directory exists on the SFTP server:

Directory Exists:
Display Name: "Check Directory Existence"
Client: sftpClientObject
Server Path: "/Documents/"
Result: doesDirectoryExist

In this example, the activity checks the existence of the "/Documents/" directory on the SFTP server using the provided SFTP client object. The result of the existence check is stored in the boolean variable "doesDirectoryExist" for further handling in the workflow.